package com.griddroid.configuration;

import android.os.Message;

/**
 * It is the basic configuration for the Grid. It contains standard
 * fields that set the Server's IP and port, some time intervals and timeouts,
 * 
 * @author Charalampos Mavroforakis
 * @author Michail Michailidis
 * @author Thomas Ailianos
 */
public class GridConfig
{
	/**
	 * suggests the Server IP when a new socket between server and a
	 * client/worker is being made.
	 */
	public static final String SERVERIP = "10.0.2.2";
	/**
	 * suggests the Server Port when a new socket between server and
	 * a client/worker is being made.
	 */
	public static final int SERVERPORT = 8595;
	/**
	 * specifies the time that a worker or a clients is still
	 * considered alive.
	 */
	public static final int ALIVETIMEOUT = 60;
	/**
	 * specifies the time interval that server pings the workers or
	 * clients.
	 */
	public static final long PINGINTERVAL = 20000;
	/**
	 * specifies the time that a check is being done
	 */
	public static final long CHECKINTERVAL = 100;
	/**
	 * is a boolean that specifies whether debug message information is
	 * printed on view.
	 */
	public static final boolean DEBUG = true;
	/**
	 * given as a value in Message's {@link Message#what what} field
	 * specifies that the TextView should be updated
	 */
	public static final int UPDATE_TEXTVIEW = 1284;
	/**
	 * given as a value in Message's {@link Message#what what} field
	 * declares that Activity (Client/Worker/Server) should be closed.
	 */
	public static final int CLOSE = 1299;
}
